package com.kfm.wiki.job;

import cn.hutool.core.util.IdUtil;
import com.kfm.wiki.service.DocService;
import org.aspectj.lang.annotation.Around;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class DocJob {

    @Autowired
    private DocService docService;

//    @Scheduled(cron = "5/30 * * * * ?")
    public void updateCount(){
        // 增加日志流水号
        MDC.put("LOG_ID", String.valueOf(IdUtil.getSnowflakeNextId()));

        docService.updateDocInfo();
    }
}
